<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>

		<title>小吃特产</title>

	</head>


	<body>

		${foodType}
		<a href="food_toAddFood.action?foodType=${foodType}">添加</a>
		<table border="1">
			<tr>
				<td>
					序号
				</td>
				<td>
					名字
				</td>
				<td>
					图片
				</td>
				<td>
					添加时间
				</td>
				<td>
					主页显示权重
				</td>
				<td>
					次页显示权重
				</td>
				<td>
					操作
				</td>
			</tr>
			<c:forEach var="food" items="${foodList}" varStatus="status">
				<tr>
					<td>
						${status.count}
					</td>
					<td>
						<a href="food_showOneFood.action?foodId=${food.foodId}">${food.name}</a>
					</td>
					<td>
						<img alt="图片无法加载" src="${website}resource/${food.imageUrl}" width="100"
							height="60" />
					</td>
					<td>
						<fmt:formatDate value="${food.addFoodTime}" pattern="yyyy年MM月dd日" />
					</td>
					<td>
						${food.isShowInMain}
					</td>
					<td>
						${food.isShowInSecond}
					</td>
					<td>
						<a
							href="food_deleteOneFood.action?foodType=${foodType}&&foodId=${food.foodId}"
							onclick="return confirm('确认要该食物删除?');"
> 删除</a> |
						<a href="food_toUpdateFoodPage.action?foodType=${foodType}&&foodId=${food.foodId}">编辑</a>
					</td>
				</tr>
			</c:forEach>
		</table>
	</body>
</html>
